class AcceptanceCategory {
  final int id;
  final int? parentId;
  final String name;
  final int level;
  final int sortOrder;

  AcceptanceCategory({
    required this.id,
    this.parentId,
    required this.name,
    required this.level,
    required this.sortOrder,
  });

  factory AcceptanceCategory.fromJson(Map<String, dynamic> json) {
    return AcceptanceCategory(
      id: json['id'] as int,
      parentId: json['parent_id'] as int?,
      name: json['name'] as String,
      level: json['level'] as int,
      sortOrder: json['sort_order'] as int,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'parent_id': parentId,
      'name': name,
      'level': level,
      'sort_order': sortOrder,
    };
  }
} 